from page.city_page import CityPage

class CityHandle():
    def __init__(self, driver):
        self.city_p = CityPage(driver)

    # 点击添加按钮
    def click_add_buttom(self):
        self.city_p.get_add_element().click()

    # 输入城市名
    def send_city_name(self, name):
        self.city_p.get_city_element().send_keys(name)

    # 输入描述
    def send_desc(self, desc):
        self.city_p.get_desc_element().send_keys(desc)

    # 保存
    def click_save_buttom(self):
        self.city_p.get_submit_element().click()

    